#define  _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;


class person
{
public:
	void func()
	{
		cout << " 1 " << endl;
	}
	int _a = 1;
};

class student : public person
{
public:
	void func()
	{
		cout << " 2 " << endl;
	}
	int _b;
};

int main()
{
	student s;
	s.func();

	return 0;
}

class Base
{
public:
	virtual void func1()
	{
		cout << "func()" << endl;
	}
private:
	int _b;
};

int main()
{
	Base b;
	cout << sizeof(b) << endl;

	return 0;
}

class Base
{
public:
	virtual void func()
	{
		cout << "Base func()" << endl;
	}
	int _b = 1;
};

class Drive : public Base
{
public:
	virtual void func()
	{
		cout << "Drive func()" << endl;
	}
	int _b = 2;
};

void test1()
{
	Base b1;
	Drive d1;
}

void test2()
{
	Base b2;
	Drive d2;
}

int main()
{
	test1();
	test2();
	return 0;
}